package com.wtb.javatool.dao;

import com.github.pagehelper.Page;
import com.wtb.javatool.vo.StuApplyDetailDto;
import com.wtb.javatool.vo.StuApplyRecordPageDto;
import com.wtb.javatool.entity.StuApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StuApplyMapper {

    Page<StuApply> pageQuery( @Param("name") String name,
                              @Param("status") String status);

    Page<StuApply> stuApplyRecordpageQuery(StuApplyRecordPageDto stuApplyRecordPageDTO);

    void update(StuApply stuApply);

    void insert(StuApply stuApply);

    @Select("select * from stu_apply ORDER BY apply_time DESC")
    List<StuApplyDetailDto> stuListAll();
    @Select("select * from stu_apply where id = #{id}")
    StuApply selectById(int id);

    @Select("select * from stu_apply where stu_sno = #{stuSno}")
    StuApply selectByStuSno(String stuSno);
}
